
# ------------------------------------------------------------------------------
# Replication Materials
# 
# title: Coalition Size, Direct Democracy, and Public Spending
# journal: Journal of Public Policy
# authors: Patrick Emmenegger, Lucas Leemann, and André Walter
# date: Sept 2020
# ------------------------------------------------------------------------------


# Measure how long it takes to run code
start.time <- Sys.time()



# Load libraries
library(openxlsx)     # CRAN v4.1.5
library(lmtest)       # CRAN v0.9-37
library(dplyr)        # CRAN v1.0.2
library(tidyr)        # CRAN v1.1.1
library(ggplot2)      # CRAN v3.3.2
library(multiwayvcov) # CRAN v1.2.3
library(sandwich)     # CRAN v2.5-1
library(car)          # CRAN v3.0-9
library(lfe)          # CRAN v2.8-5.1
library(cowplot)      # CRAN v1.0.0
library(MASS)         # CRAN v7.3-52
library(extrafont)    # CRAN v0.17
library(AER)          # CRAN v1.2-9          
library(texreg)       # CRAN v1.37.5 
library(psych)        # CRAN v2.0.7
library(lme4)         # CRAN v1.1-23
library(brms)         # CRAN v2.13.5         
library(xtable)       # CRAN v1.8-4


# Data
load("in/analysis_data.RData")


# Manipulation
source("01_Data_Manipulation.R")

# Descriptive Figures
source("01_Descriptive_Plots.R")

# Main Models
source("01_Main_Analysis.R")

# Result Stability?
source("01_Result_Stability.R")

# Appendix
source("01_Appendix.R")




# Measure how long it takes to run code
end.time <- Sys.time()
end.time - start.time


